#ifndef THREAD_H_
#define THREAD_H_

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctime>
#include <unistd.h>

class Thread {
protected:
	pthread_t hilo;
	pthread_attr_t attr;
	bool liberar;
	bool activo;
	virtual void correr() = 0;

public:
	Thread();
	virtual ~Thread();
	virtual void run();
	virtual void stop();
	virtual bool running() const;
	virtual void join();

private:
	static void* start(void* argumento);
	Thread(const Thread& t);
	Thread& operator=(const Thread&);
};

#endif
